This page has been superceded by a wiki version of this example: FunctionExample







uint squareIt(uint x)

{

    return x * x;

}





void main()

{

    int i;

    printf("%d\t(initial value)\n", i);





    i = squareIt(3);

    printf("%d\t(3 * 3)\n", i);



    i = squareIt(4);

    printf("%d\t(4 * 4)\n", i);



    i = squareIt(5);

    printf("%d\t(5 * 5)\n", i);

}